home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / comm / mail / YAM23.lha / YAM2.3 / Rexx / SetFrom.yam < prev    next >
Text File  |  2000-04-19  |  2KB  |  46 lines

  1. /* SetFrom.yam - Set the from address automatically              */
  2. /* $VER SetFrom.yam v1.0 (21.5.99) © 1999 M. Beck <mbeck@yam.ch> */
  3.  
  4. /**********************************************************/
  5. /*                                                        */
  6. /* SetFrom.yam  This script should be installed in the    */
  7. /* ARexx configuration on the "Before writing a message"  */
  8. /* selection.  To use this script successfully, set up    */
  9. /* an alias as foldername.sender  - which means if your   */
  10. /* folder is called Webring-ML, you should set up an      */
  11. /* alias as Webring-ML.sender in your address book.  For  */
  12. /* every folder you do this on, the From: address will    */
  13. /* be replaced with foldername.sender (Webring-ML.sender) */
  14. /*                                                        */
  15. /* This is really useful if you have a single account     */
  16. /* with multiple addresses eg, Dave <fish@pseudo.a.com>,  */
  17. /* Grandad <oldman@pseudo.a.com>.  If you have this type  */
  18. /* of account, it makes mailinglist filtering foolproof,  */
  19. /* since you can always send from eg, jokeML@pseudo.a.com */
  20. /* and you can ALWAYS filter successfully by matching     */
  21. /* "X-RCPT: jokeML".                                      */
  22. /*                                                        */
  23. /* To actually use this script (transparently), you must  */
  24. /* be in the correct folder when you reply/write/forward  */
  25. /* your message eg, in our example you must have the      */
  26. /* "Webring-ML" folder selected for the From: address to  */
  27. /* be set to Webring-ML.sender (this is the alias meaning */
  28. /* "Your Name <Webring-ML@pseudo.a.com>").                */
  29. /*                                                        */
  30. /* Original non-functional script by Glen Shannon         */
  31. /* <glen@dryad.clara.net> re-written to actually work by  */
  32. /* Marcel Beck <mbeck@yam.ch>.      LONG LIVE YAM !!!!!   */
  33. /*                                                        */
  34. /**********************************************************/
  35.  
  36.  
  37. OPTIONS RESULTS
  38. ADDRESS YAM
  39. FOLDERINFO STEM folder.               /* get current folder */
  40. fromalias = folder.name'.sender'      /* alias to look for is foldername.sender */
  41. OPTIONS FAILAT 11                     /* ignore possible error from ADDRINFO */
  42. ADDRINFO fromalias                    /* sets RC=10 if alias doesn't exist */
  43. IF RC = 0 THEN WRITEFROM fromalias    /* if alias exists, put it in the from field */
  44. EXIT
  45.  
  46.